﻿@inherits VocaDb.Web.Code.VocaDbPage
@using VocaDb.Model.Domain.Security
@using Res = ViewRes.Discussion.IndexStrings

<label>@Res.Topic</label>
<input data-bind="textInput: name" type="text" class="input-xlarge" maxlength="200" required />

<div class="discussion-topic-edit-content">
	
	<div class="edit-text">
		<label>@Res.PostContent</label>
		<textarea data-bind="textInput: content" cols="60" rows="6" required></textarea>		
	</div>
	
	<div class="edit-preview">
		<label>@Res.Preview</label>
		<div data-bind="markdown: content"></div>
	</div>
	
	@if (UserContext.HasPermission(PermissionToken.DeleteComments)) {
		<div data-bind="visible: folders && folders.length">
			<label>Folder</label>
			<select data-bind="value: folderId, options: folders, optionsText: 'name', optionsValue: 'id'"></select>
		</div>
		<p>
			<label>
				<input type="checkbox" data-bind="checked: locked" />
				Locked
			</label>
		</p>
	}

</div>

